package com.juli.school.app.controller;

import java.util.List;

import javax.annotation.Resource;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.juli.school.service.bo.SchoolBo;
import com.juli.school.service.impl.SchoolService;
import com.juli.school.utils.core.model.CommonResp;

/**
 * 基站优惠模块
 * @author wjp
 * @date 2017年9月10日
 */
@Controller
@RequestMapping("/school")
public class SchoolController {

	@Resource
	private SchoolService schoolService;

	@RequestMapping("/get")
	@ResponseBody
	CommonResp<SchoolBo> get(Integer id) {
		return schoolService.get(id);
	}

	/**
	 * 支持模糊搜索，省市学校名称
	 * @param prv 省
	 * @param city 市
	 * @param college 学校名称
	 * @param pageNo 当前页码
	 * @return
	 */
	@RequestMapping("/list")
	@ResponseBody
	public CommonResp<List<SchoolBo>> list(String prv, String city, String college) {
		return schoolService.listPage(prv, city, college);
	}

}
